<!DOCTYPE html>
<html lang="en">
    <head>
        <title>component-2 组件</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script type="text/javascript" src="../assets/js/vue.js"></script>
    </head>
    <body>
        <h1>component-2 组件</h1>
        <hr>
        <div id="app">
            <heheda1 form-here1="China"></heheda1>
            <heheda2 form-here2="jiangsu"></heheda2>
        </div>
        <template id="template">
                <div style="color:red;">I'm in the {{formHere2}}</div>
        </template>
        <script type="text/javascript">
           var app=new Vue({
               el:'#app',
               data:{
                   message:'呵呵哒',
               },
               components:{
                   'heheda1':{
                       template:`<div style="color:red;">panda form {{formHere1}}</div>`,
                       props:['formHere1']//因为vue不支持-，所以在构造器中用小驼峰的写法把form-here改成formHere
                   },
                   'heheda2':{
                       template:'#template',
                       props:['formHere2']//因为vue不支持-，所以在构造器中用小驼峰的写法把form-here改成formHere
                   }
               }
           })
        </script>
    </body>
</html>